package com.project.fiveCerealsSavoury.service;

import java.io.UnsupportedEncodingException;
import java.util.List;

import com.project.fiveCerealsSavoury.domain.DeliveryDomain;
import com.project.fiveCerealsSavoury.domain.Goods;
import com.project.fiveCerealsSavoury.domain.Message;
import com.project.fiveCerealsSavoury.domain.Order;
import com.project.fiveCerealsSavoury.domain.OrderState;
import com.project.fiveCerealsSavoury.domain.Trade;
import com.project.fiveCerealsSavoury.domain.User;
import com.project.fiveCerealsSavoury.exception.BizException;
import com.project.fiveCerealsSavoury.transfer.AddOrder;
import com.project.fiveCerealsSavoury.transfer.Page;
import com.project.fiveCerealsSavoury.transfer.UserBalace;
import com.project.fiveCerealsSavoury.transfer.UserBuy;
import com.project.fiveCerealsSavoury.transfer.UserLogin;
import com.project.fiveCerealsSavoury.transfer.UserRetreat;
import com.project.fiveCerealsSavoury.transfer.UserSet;


/**
 * 综合
 * 普通用户
 * @author Administrator
 *
 */
public interface IntegrationService {
	/**
	 * 注册
	 * @param user
	 * @return
	 */
	public boolean reg(User user)throws BizException;
	/**
	 * 登录
	 * @param userLogin
	 * @return
	 * @throws BizException
	 */
	public User login(UserLogin userLogin)throws BizException;
	/**
	 * 充值
	 * @param userBalace
	 * @throws BizException
	 */
	public void full(UserBalace userBalace)throws BizException;
	
	/**
	 * 修改
	 * @param userSet
	 * @throws BizException
	 */
	public void setUser(UserSet userSet)throws BizException;
	/**
	 * 查询当前用户
	 * @param userId
	 * @return
	 * @throws BizException
	 */
	public User queryUser(Integer userId)throws BizException;
	/**
	 * 下单
	 * @return
	 */
	public Message bug(UserBuy userBuy, Integer userId)throws BizException;
	/**
	 * 退单
	 * @param orderId
	 * @param userId
	 * @return
	 */
	public Message retreat(UserRetreat userRetreat) throws BizException;
	
	/**
	 * 查询当前交易记录
	 * @param userId
	 * @return
	 */
	public Page queryTrade(Integer userId,Integer pageIndex)throws BizException;
	/**
	 * 查询所有管理员
	 */
	public List<User> queryAdmin(String isAdmin)throws BizException;

	
	public boolean addShop(AddOrder addOrder)throws BizException, UnsupportedEncodingException;

	
//	public boolean remove(Integer id)throws BizException;
	
	public Order pay(Integer id) throws BizException;
	
	public boolean setIsgin(Integer id, String isSign) throws BizException;

}
